//https://exam.nowcoder.com/cts/17252529/summary?id=74A2998F00F6050A5D2B1AAD67C4DCC3#4/{%22uid%22%3A%2274A2998F00F6050A5D2B1AAD67C4DCC3%22%2C%22type%22%3A%224%22%2C%22index%22%3A1}


#include <iostream>
#include <string>
using namespace std;

int main()
{
    string s;
    string s_del;
    getline(cin, s);
    cin >> s_del;
    int s_index = 0;
    while (s_index < s.size())
    {
        int s_del_index = 0;
        while (s_del_index < s_del.size())
        {
            if (s[s_index] == s_del[s_del_index])
            {
                s.erase(s_index, 1);
                --s_index;
            }
            ++s_del_index;
        }
        ++s_index;
    }
    cout << s;
    return 0;
}